export const formatDate = (value) => {
    const year = value.getFullYear();
    let month = value.getMonth() + 1;
    if (month < 10) {
        month = '0' + month;
    }
    let day = value.getDate();
    if (day < 10) {
        day = '0' + day;
    }
    let hours = value.getHours();
    if (hours < 10) {
        hours = '0' + hours;
    }
    let minutes = value.getMinutes();
    if (minutes < 10) {
        minutes = '0' + minutes;
    }
    let seconds = value.getSeconds();
    if (seconds < 10) {
        seconds = '0' + seconds;
    }
    return year + '-' + month + '-' + day + ' ' + hours + ':' + minutes + ':' + seconds;
}
